import { createBrowserRouter, Navigate } from "react-router-dom"
import React from "react"
//懒加载
const Login = React.lazy(() => import("../Login"))
const Shou = React.lazy(() => import("../components/Shou"))
const Register = React.lazy(() => import("../components/Register"))
// const Lou = React.lazy(() => import("../components/Lou"))
const router = createBrowserRouter([
    {
        path: "/login", element: <Login></Login>,
        // children: [
        //     { path: "/app/shou", element: <Shou></Shou> },
        //     { path: "/app/lou", element: <Lou></Lou> },
        //     { path: "/app/ye", element: <Ye></Ye> },
        //     { path: '/app', element: <Navigate to='/app/shou'></Navigate> }
        // ]
    },
    { path: "/shou", element: <Shou></Shou> },
    { path: "/register", element: <Register></Register> },
    { path: '/', element: <Navigate to='/login'></Navigate> }
])
export default router




